<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>demo</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>

<body>
    <div id="app"></div>
    <script type="text/javascript">
        window.ssoHost = 'http://sso.dev.cnki.net/sso/';
        window.ssoAppId = 'OKMS_XMLEDITOR_DEV';
        window.moduleCode = getQueryString("moduleCode") || '';
        window.resourceID = getQueryString("resourceCode") || '';
        window.apiurl = getQueryString("apiurl") || 'coeduApi';
        window.typeId = getQueryString("typeId") || '';
        window.uidFromUrl = getQueryString("uid") || '';
        window.tokenFromUrl = getQueryString("token") || "";
        if(location.hostname === "localhost"){
            window.typeId = "0d28e543-182c-4d6d-9c62-1216b22a61e1";
            window.resourceID = "4905469e-b327-4db6-a3c5-b30cdf82fc92";
            window.moduleCode = "9e5474fe-1143-4c77-97d2-67fa2c70d2a8";
            window.apiurl = "coeduApi";
            window.uidFromUrl = "62f40f1a-2a4f-4e4a-9fe7-87ee597bf632";
            window.tokenFromUrl = "e5e7dbe2abbb4def972e5ae4c6565b20";
        };
        window.language = 'zh_cn';
        window.title = '';
        /**
         * 获取url上的参数
         */
        function getQueryString(name) {
            var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
            var r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return decodeURIComponent(r[2]);
            }
            return null;
        }
        /**
         * 通知父页面传送数据
         */
        window.parent.postMessage("readyReceiveData", "*");
        /**
         * 接收父级页面传过来的数据
         */
        window.addEventListener("message"
          , function (e) {
              if(e.data && e.data.isFromFather){
                  window.dataFromFather = e.data;
              }
          }
          ,false
        );
    </script>
    <script src="ueditor/ueditor.config.js"></script>
    <script src="ueditor/ueditor.all.js"></script>
    <script src="ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="ueditor/lang/en/en.js"></script>
    <script src="ueditor/third-party/zeroclipboard/ZeroClipboard.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor/kityformula-plugin/getKfContent.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor/kityformula-plugin/defaultFilterFix.js"></script>
    <script src="tencentlib/ugcUploader.js"></script>
    <script src="layui/layui.all.js"></script>
</body>
